//
import request from '@/utils/request'

// 新增部门
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 查询部门(所有)
export function getDepartmentList() {
  return request({
    url: '/company/department',
    method: 'get'

  })
}

// /company/department / { id }
// 修改部门
export function putDepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

// 删除部门
export function delDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

// 获取部门(特定的部门)
export function getDepartment(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
